#ifndef CHARACTER_H
#define CHARACTER_H

#include <QString>

enum 字符类型 {
    小写字母,
    大写字母,
    阿拉伯数字,
    运算符,
    括号,
    标点符号,
    分隔符,
    无法匹配
};
enum _variety_character {
    _letter_small,
    _letter_big,
    _digit,
    _operator,
    _bracket,
    _punctuation,
    _separator,
    _not_match
};

class Character
{
public:
    Character();
    Character(_variety_character, char);
    Character(字符类型, char);

    _variety_character GetVariety();
    _variety_character GetVariety() const;
    char GetContent();
    char GetContent() const;

    void SetVariety(_variety_character);
    void SetVariety(字符类型);
    void SetContent(char);

    bool operator<(const Character&);
    bool operator<(const Character&) const;
    bool operator==(const Character&);
    bool operator==(const Character&) const;
    bool operator==(char);
    bool operator==(char) const;
    bool operator==(QChar);
    bool operator==(QChar) const;

    QString GetVarietyString_en();
    QString GetVarietyString_en() const;
    QString GetVarietyString_cn();
    QString GetVarietyString_cn() const;

    static _variety_character IntToVariety(int);
    static QString IntToVarietyString_en(int);
    static QString IntToVarietyString_cn(int);
    static _variety_character String_cnToVariety(QString);

private:
    _variety_character variety;  // 符号种类
    char content;    // 符号内容
    static _variety_character arrChar[8];
    static QString strVariety_en[8],strVariety_cn[8];
};

#endif // CHARACTER_H
